﻿@using SCMS.Resource
@model SCMS.Model.MBProjection
@{AjaxOptions ajaxOpts = new AjaxOptions { UpdateTargetId = "budgetDiv", LoadingElementId = "loading", HttpMethod = "Post", Url = Url.Action("SaveProjection"),
    OnSuccess="CloseDialog"};}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Ajax.BeginForm(ajaxOpts))
{ 
    <table>
        <tbody>  
            @if (Model.Id.Equals(Guid.Empty))
            {
                <tr>
                    <td align="right"><b>@Resources.Budget_EditLinkToMB_MBCategory<font color="red">*</font>:</b></td>
                    <td>
                        @Html.DropDownListFor(model => Model.MasterBudgetCategoryId, Model.MasterBudgetCategories, Resources.Global_String_PleaseSelect)<br />                 
                        @Html.ValidationMessageFor(model => model.MasterBudgetCategoryId)
                    
                    </td>
                </tr>
            }   
            <tr>
                <td align="right"><b>@Resources.Global_String_Currency<font color="red">*</font>:</b></td>
                <td>
                    @Html.DropDownListFor(model => model.CurrencyId, Model.Currencies)<br />
                    @Html.ValidationMessageFor(model => model.CurrencyId)
                </td>
            </tr>
            <tr>
                <td align="right"><b>@Resources.MasterBudget_CreateProjection_AmountProjected<font color="red">*</font>:</b></td>
                <td>
                    @Html.TextBoxFor(model => model.AmountProjected, new { @class = "numericTb" })<br />
                    @Html.ValidationMessageFor(model => model.AmountProjected)
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    @Html.HiddenFor(p => p.Id)
                    <input type="submit" value="@ViewBag.ButtonText" />&nbsp;
                    <input type="button" value="@Resources.Global_String_Cancel" onclick="javascript:CloseDialog()" />
                </td>
            </tr>
         </tbody>
    </table>
}  